<!--  -->
<template>
  <div class="TABBOX">
    <div class="tabtitle">
      <img :src="item.imgUrl" alt />
      <span>{{item.name}}</span>
    </div>
    <div :class="`tabnumber tabnumber${index}`">{{item.num}}</div>
  </div>
</template>

<script>
export default {
  name: "TABBOX",
  props: ["item", "index"],
  data() {
    return {};
  },
  //生命周期 - 创建完成（访问当前this实例）
  created() {},
  //生命周期 - 挂载完成（访问DOM元素）
  mounted() {},
  //事件方法
  methods: {}
};
</script>
<style scoped lang="scss">
/* @import url(); 引入css类 */
.TABBOX {
  width: 23%;;
  height: 50px;
  display: flex;
  justify-content: space-between;
  border-radius: 5px;
  align-items: center;
  background: #fff;
  padding: 10px;
  font-weight: 600;
  .tabtitle {
    width: 50%;
    display: flex;
    justify-content: space-around;
    align-items: center;
  }
  img {
    width: 50px;
    height: 50px;
  }
  .tabnumber {
    font-size: 20px;
  }
}
.tabnumber0 {
  color: rgb(187, 186, 255);
}
.tabnumber1 {
  color: #c2f146;
}
.tabnumber2 {
  color: #f8925a;
}
.tabnumber3 {
  color: #eea9fa;
}
</style>